package com.front.web.lvyou_specialty_front;

import com.bootdo.common.utils.R;
import com.bootdo.lvyou_specialty.domain.LvyouSpecialtyMenu;
import com.bootdo.lvyou_specialty.service.LvyouSpecialtyMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/f/productController")
public class ProductMenuFrontController {

    @Autowired
    private LvyouSpecialtyMenuService lvyouSpecialtyMenuService;

    /**
     * http://localhost/f/productController/getAllType
     * 展示出所有的类别
     * @return
     */
    @RequestMapping("getAllType")
    public R getAllType() {

        Map<String, Object> param = new HashMap<>();
        param.put("parentId", 0);

        return R.ok().put("l", lvyouSpecialtyMenuService.list(param));
    }

}
